//
// Created by hunan on 25-7-13.
//

#ifndef DOWNLOAD_NET_OPERATE_H
#define DOWNLOAD_NET_OPERATE_H

#include <memory>
#include <string>
#include <vector>

class ProtocolConnection;
class ProtocolConnectionPool;
class Loop;
class DownloadNetOperate
{
public:
    DownloadNetOperate(Loop * loop);
    ~DownloadNetOperate();
    int ResizeConnection(int size) const;
    std::shared_ptr<ProtocolConnection> GetConnection() const;
    void ReleaseConnection(const std::shared_ptr<ProtocolConnection>& connection) const;
    void CloseConnection() const;
private:
    ProtocolConnectionPool * m_net_operate;
    Loop * m_loop;
};


#endif //DOWNLOAD_NET_OPERATE_H
